Skip to main content

Robot Guide

Docs Version Dropdown

01. What can command robots do?

Command robot is a DeBox user, he and ordinary users, he can change the nickname, avatar, post dynamics, create groups, join other groups, etc., has all the capabilities of DeBox users. In addition, he has the following special powers:
1、With Bot tag, identify their own robot identity;
2、With secondary development capabilities, you can send robot messages based on this identity and act as a counterparty to integral payments;
3、Configure commands and interact with users through commands;
4、You can push messages to your followers;
5、You can push messages to your group;
6、Provide services on behalf of the brand。

02. How to become a robot?

Register as a developer

click https://developer.debox.pro ,Sign in via Metamask, or sign in via email。

Bind the DeBox user

Once the binding with the Debox user is completed, the developer can develop based on the Debox user;
For example, in the name of the Debox user, send messages;
By paying the API, the receiver or sender of the point payment;
As a representative of the brand, he serves fans in the form of instructions;
Because the Debox account will be directly presented to the user, please carefully configure the nickname and avatar of the account, such as using the developer's brand name to make nicknames, and use the brand logo as the avatar. Docs Version Dropdown

Apply to be a robot

1、Correctly configure the callback address URL, call back key, click Submit to complete the robot application.
2、Config Robot CallbackUrl:This address is the callback address of the instruction robot instruction. When the Debox user accesses the ROBOT instruction, the Debox system will call back the URL, And bring the command, users, groups and other parameters back. The parameter is json format, the field is as follows:
header parameters
X-API-KEY:It is the 3rd Robot CallbackKey, which is configured by developers. Developers can verify the legality of requesting the request.
body parameters,json format
from_user_id:sender ID,DeBox User ID;
to_user_id: command receiver ID, that is, the user ID of the robot;
language:Language type, value EN means that the user is the English environment, and the value of ZH means that the user is the Chinese environment;
message: command message. Developers make a corresponding reply according to this;
group_id: group ID;
If the user interviews the command through group chat, the parameter is the ID of the group;
The user interviewed by private chat, then the parameter is "" ;
Developers can judge the source according to the group_id parameter, and determine the response method, such as sending a group message, or sending a private chat message.
3、Config Robot CallbackKey:When the X-API-Key, the Debox system calls the callbackurl, the parameter will be added to the header. Developers need to check the X-API-Key in the routing function of CallBackurl to verify access permissions. Docs Version Dropdown

CallbackUrl handler sample(go language):
Docs Version Dropdown

03. Configure instructions to interact with users through instructions

The instruction robot can serve users by instructions. According to the functional positioning of the robot, configure its simple and easy -to -understand instructions;
For example, configuration instructions for market broadcasting robots /BTC, /Hot, configuration /news, /hot news for news robots;
Developers can add, delete, and edit instructions through [Robot] [Command List];
On the client, enter the private chat interface with the robot, and evoke the instruction through "/", and directly send the robot to the robot on the private chat interface.
The robotic instructions under development cannot be evoked by group/. After the development and testing are completed, the developer applies to the market. After the review of the reviewers is completed, it can only be used in the group.
Docs Version Dropdown

04. Command response

In the routing function of the Robot CallBackurl above, the developer conducts instruction message processing and processes data inquiries such as different instructions.
The results will be notified by the process of processing.
Group chat, private chat message API, see the documentation https://docs.debox.pro/zh/APIs/Sending%20Messages

05. Publish robot

After the above configuration and development, the developer already has a robot that can handle instructions.

After the developer is passed, the robot market can be submitted to the robot market.
The administrator will test the robot instructions. If it complies with the quality management specifications of the robot, you can enter the robot market.
It may also be rejected by the auditors, and the developer can be re -approved after modification.
Docs Version Dropdown

06. How to configure robot robots

Through BOT, it is a robot user representing a brand to provide service capabilities through service capabilities.

Robot robot is also a Debox user, which can be configured on the Debox APP.
1、Comes with BOT mark. After completing the robot application, the BOT label logo is automatically obtained;
2. Configure the avatar on the APP side, and generally use the brand's logo;
3. Configure the name on the app side, which is generally the name of the brand;
4. Configure a personalized signature on the APP side. The signature, as the remark of the robot, appears in the instruction list;
5. Publish dynamics on the APP end to interact with fans.
Docs Version Dropdown